Give Groq its own key and model - #2
Merged
Merged
Conversation
Groq speaks the OpenAI wire format, so it reuses the same tested adapter. It was reaching that adapter by borrowing OPENAI_API_KEY and overriding the base URL, which works and reads like a mistake: a gsk_ key living under a name that says "openai" is a trap for whoever opens the file next. So PROVIDER=groq now has groq_api_key, groq_model and groq_base_url of its own, and appears in active_model and has_credentials alongside the others. OPENAI_BASE_URL stays for anything else that speaks the same format, which is what it was for. Three tests: the provider builds the OpenAI adapter against Groq's endpoint, it falls back to the demo model when its own key is absent rather than quietly using OpenAI's, and active_model reports the right one.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Groq speaks the OpenAI wire format, so it reuses the same tested adapter. It was reaching that adapter by borrowing
OPENAI_API_KEYand overriding the base URL. That works, and it reads like a mistake: agsk_key living under a name that says "openai" is a trap for whoever opens the file next.PROVIDER=groqnow hasgroq_api_key,groq_modelandgroq_base_urlof its own, and appears inactive_modelandhas_credentialsalongside the other providers.OPENAI_BASE_URLstays for anything else that speaks the same format (Together, OpenRouter, a local server), which is what it was for.Three tests, 36 total:
active_modelreports Groq's modelThe eval writeup's reproduce block uses the new variables. Verified by running the suite end to end on the renamed config.